<extend name="Public/base" />
<block name="title1">商品评价</block>
<block name="css"> 
<link rel="stylesheet" href="__PUBLIC__/Css/Home/index/comment.css" />

</block>

<block name="main1">
<div style='height:50px;'></div>
<div class="container">
	<div class="row clearfix">
		<div class="col-md-12 column">
			<div class="tabbable" id="tabs-230395">
				<ul class="nav nav-tabs">
					<li class="active">
						 <a href="#panel-493205" data-toggle="tab">商品评价</a>
					</li>
				</ul>
				<div class="tab-content"  >
					<div class="tab-pane active" id="panel-493205">
						<div class="col-md-12 column">
							<p><font color='red' size=4><b>商品名称:<{$good.goods_name}></b></font></p>
			                 <img alt="140x140" width=180px height='140px' src="__ROOT__/Uploads/prod/<{$good.goods_pic}>" class="img-rounded" />
							 <span><{$first.attr_name}>:<{$good.color}></span><span><{$second.attr_name}>:<{$good.mobtype}></span><span><{$third.attr_name}>:<{$good.memory}></span>
		                </div>
						<p>评价时间:<{$time|date="Y-m-d H:i:s",###}></p>
						<form action="<{:U('docomment')}>" method='post'>
							<input type="hidden" name='goods_id' value="<{$good.id}>"/>
							<input type="hidden" name='user_id' value="<{$Think.session.uid}>"/>
							<input type="hidden" name='user_name' value="<{$Think.session.username}>"/>	
							<textarea name="content" id="comment" cols="80" rows="10" style='resize:none;'></textarea><br />
		                 <button type='button' name='but_add' class='btn btn-primary'>发表评论</button>
						</form>
					</div>
					<div id='msg' class="btn btn-warning" style="display:none;position:absolute;"></div>
				</div>
			</div>
		</div>
	</div>
</div>
<script>
	$(function(){
		$("[name=but_add]").click(function(){
			var comment=$("#comment").val();
			if(!comment==''){
				$('form').submit();
			}else{
				$("#msg").text("您还没有输入任何评价内容");
				$('#msg').css('display','block');
				setTimeout(function(){$('#msg').fadeOut('slow');},2000);
			}
		});
			
			
			
		
		
		
	});
	
</script>
</block>